package simultaneously.base;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by 焕滨 on 2016/3/12.
 */
public class SingleThreadExecutor {
    public static void main(String[] args){
        //SingleThreadExecutor中管理的线程按照顺序执行，一个执行完再执行下一个
        ExecutorService exec = Executors.newSingleThreadExecutor();
        for(int i = 0;i<5;i++){
            exec.execute(new LiftOff());
        }
        exec.shutdown();
    }
}
